>>>>>>> ca028d10f208fd5a04d586b2918fce0c9e7e581c
---
class: left
### Are China and the US committed to reducing fossil fuels?
<p align="center">
<iframe src="https://dcs-210.github.io/w2022-project-lorenowenjackie/proposal/map_anim.gif" width="5016", height="516", frameBorder="0"></iframe>
</p>
---
class: left
### What do these trends look like in the future?
.center[
```r
m_USA <- linear_reg() %>%
set_engine("lm") %>%
fit(fossil_fuel_consumption ~ year, data = year_1990_USA)
new_fossil_USA <- data.frame(year = seq(1990, 2030, by = 2), country =
rep("United States", 21 ))
new_fossil_USA <- new_fossil_USA %>%
mutate(predicted = predict(m_USA, year_1990_USA)$.pred,
actual = year_1990_USA$fossil_fuel_consumption)
```
]
- Linear regression projecting fossil fuel data from 1900 to 2030
- Selected code from after data cleaning and transforming
---
class: left, top
### Results of our linear model
.pull-left[
```
## year country predicted actual
## 1 1990 United States 21314.21 19813.402
## 2 1992 United States 21407.93 20083.125
## 3 1994 United States 21501.64 20893.884
## 4 1996 United States 21595.35 21883.039
## 5 1998 United States 21689.07 22301.748
## 6 2000 United States 21782.78 23224.264
## 7 2002 United States 21876.49 22941.458
## 8 2004 United States 21970.20 23499.054
## 9 2006 United States 22063.92 23185.686
## 10 2008 United States 22157.63 22789.636
## 11 2010 United States 22251.34 22174.395
## 12 2012 United States 22345.05 21197.905
## 13 2014 United States 22438.77 21940.02
## 14 2016 United States 22532.48 21428.95
## 15 2018 United States 22626.19 22196.473
## 16 2020 United States 22719.90 <NA>
## 17 2022 United States 22813.62 <NA>
## 18 2024 United States 22907.33 <NA>
## 19 2026 United States 23001.04 <NA>
## 20 2028 United States 23094.75 <NA>
## 21 2030 United States 23188.47 <NA>
```
]
.pull-right[
```
## year country predicted actual
## 1 1990 China 4542.133 7620.275
## 2 1992 China 6595.772 8456.527
## 3 1994 China 8649.411 9572.766
## 4 1996 China 10703.050 10365.629
## 5 1998 China 12756.689 10411.263
## 6 2000 China 14810.328 11119.51
## 7 2002 China 16863.967 12699.612
## 8 2004 China 18917.606 17375.205
## 9 2006 China 20971.244 21671.211
## 10 2008 China 23024.883 24004.399
## 11 2010 China 25078.522 26704.582
## 12 2012 China 27132.161 29660.252
## 13 2014 China 29185.800 30841.824
## 14 2016 China 31239.439 30872.326
## 15 2018 China 33293.078 32388.702
## 16 2020 China 35346.717 <NA>
## 17 2022 China 37400.356 <NA>
## 18 2024 China 39453.995 <NA>
## 19 2026 China 41507.634 <NA>
## 20 2028 China 43561.273 <NA>
## 21 2030 China 45614.912 <NA>
```
]
---
class: left
###Plot of actual vs. predicted data
.center[
<img src="presentation_files/figure-html/USA-vs-China-fossil-predictions-1.png" title=" The visualization predicts the projected values of fossil fuel consumptin in the future. Notice that the prediction model for China is more accurate than the US." alt=" The visualization predicts the projected values of fossil fuel consumptin in the future. Notice that the prediction model for China is more accurate than the US." width="80%" />
]
---
class: left
###Plot of actual vs. predicted data, zoomed in
.center[
<img src="presentation_files/figure-html/USA-vs-China-fossil-predictions-zoomed-1.png" width="80%" />
]
---
class: inverse, left, top
background-image: url(https://www.science.org/do/10.1126/science.aax7477/abs/solar_16x9_2.jpg)
## Who are the leaders in renewables: breaking down the difference between total consumption and per capita
.footnote[Photo credit: CPG Grey]
---
class: left, top
### Leaders in Wind: total consumption
.center[
<<<<<<< HEAD